#include "timer.h"

uint16_t utimer[USER_TIMER_NUM] = {0};

void user_timer_work(void)
{
	static uint8_t time_div = 0;

	time_div++;
	if (time_div >= 10)
	{
		time_div = 0;
	    for (uint8_t i=0; i<USER_TIMER_NUM; i++)
	    {
	        if (utimer[i] > 1)
	        {
	            utimer[i]--;
	        }
	    }

		gu8_detect_count++;
		if (gu8_detect_count >= 7)		//70ms检测一次AD
		{
			gu8_detect_count = 0;
			gu16_detect_done = 0xffff;
		}
	}
	Judge_Uart_Receive_Done();
}
